#ifndef __ASSEMBLYTREE_H__
#define __ASSEMBLYTREE_H__

#include <QtGui/QWidget>
#include <QtGui/QTreeWidget>

class QComboBox;
class QToolButton;
namespace QtAssemblyWidget
{
	class QTASSEMBLYWIDGET_API AssemblyTree : public QWidget
	{
		Q_OBJECT
	public:
		AssemblyTree(QWidget* parent = NULL);
		~AssemblyTree(void);

	public:
		QTreeWidget* operator->();

	private slots:
		void FindNextSlot(bool);
		void FindPreviousSlot(bool);
		void ShowFindWidget();
		void HideFindWidget(bool);

	private:
		void FindNextItem(QTreeWidgetItem*, QTreeWidgetItem*, QString, QTreeWidgetItem**, bool&);
		void FindPreviousItem(QTreeWidgetItem*, QTreeWidgetItem*, QString, QTreeWidgetItem**, bool&);
		bool CompareItem(QTreeWidgetItem* item, QString str);

	private:
		QToolButton*	m_HideFind;
		QToolButton*	m_FindNext;
		QToolButton*	m_FindPrevious;
		QComboBox*		m_ComboBox;
		QTreeWidget*	m_TreeWidget;
	};
}
#endif